//
//  TravelPhotoPageCollectionViewCell.m
//  旅游咨询
//
//  Created by 徐斌 on 15/4/18.
//  Copyright (c) 2015年 xubin. All rights reserved.
//
#import "TravelPhotoPageCollectionViewCell.h"
#define MAIN     ([[UIScreen mainScreen]bounds])


@implementation TravelPhotoPageCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatSubView];
    }
    return self;
}

- (void)creatSubView
{
    
    self.photoImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, MAIN.size.width / 2 - 15, MAIN.size.width / 2 - 15)];
    [self.contentView addSubview:self.photoImageView];
    self.photoImageView.layer.masksToBounds = YES;
    self.photoImageView.layer.cornerRadius = 5;
    
    
    
    
}

- (void)setModel:(TravelPhotoPageModel *)model
{
    NSURL *url = [NSURL URLWithString:model.photo_s];
    [self.photoImageView sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"imagePhoto_meitu_2.png"]];
    }

@end
